package com.example.activity;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class EventActivityTemplate extends ActivityTemplate {

    @Autowired
    public EventActivityTemplate(@Qualifier("eventActivityFactory") ActivityFactory factory) {
        this.activityFactory = factory;
    }

    @Override
    protected ActivityInstance createActivityInstance() {
        return activityFactory.createActivity();
    }

    // 可以重写初始化、配置或验证方法

    @Override
    protected void validate(ActivityInstance activity) {
        super.validate(activity);
    }

    @Override
    protected void initialize(ActivityInstance activity) {
        super.initialize(activity);
    }

    @Override
    protected void configure(ActivityInstance activity) {
        super.configure(activity);
    }
}